package newsmessages;

import newsmessages.observer.IObserver;

/**
 * Created with IntelliJ IDEA.
 * User: joeri
 * Date: 13-02-13
 * Time: 16:11
 */
public class User implements IObserver {
    private String name;

    public User() {
        this.name = "";
    }

    public User(String name) {
        this.name = name;
    }

    public void notifyNewMessage() {
        System.out.println("User: " + this.name + " received new message!");
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }
}